1. Technical Field
The present invention relates to executing code in a Java virtual machine and, in particular, to running Java code in a multiprocessor environment. Still more particularly, the present invention provides a method, apparatus, and program for creating light weight threads and executing code asynchronously.
2. Description of Related Art
Java was originally developed in 1991 as a language for embedded applications such as those used in set-top boxes and other consumer-oriented devices. Unlike hypertext markup language (HTML), which is a document display format that is continually beefed up to make it do more, Java is a full-blown programming language like C and C++. Java allows for the creation of sophisticated client/server applications to be developed for the Web and for intranets.
A Java Virtual Machine (JVM) is software that interprets Java code. A JVM may include a just-in-time (JIT) compiler to compile code into machine code just before the code is run. In the case of Java, JIT compilers convert Java's intermediate language (bytecode) into native code at any time, before or after the code executes. A JVM is incorporated into a Web browser in order to execute Java applets. A JVM is also installed in a Web server to execute server-side Java programs. A JVM can also be installed in a client machine to run stand-alone Java applications.
Symmetric multiprocessing (SMP) is a multiprocessing architecture in which multiple CPUs, residing in one cabinet, share the same memory. SMP systems provide scalability. As business increases, additional CPUs may be added to absorb the increased transaction volume. SMP systems may range from two to as many as 32 or more processors. SMP speeds up whatever processes can be overlapped. For example, in a desktop computer, SMP can speed up the running of multiple applications simultaneously. If an application is multithreaded, which allows for concurrent operations within the application itself, then SMP will improve the performance of that single application.
An SMP system will only perform concurrent operations within an application if the programmer expressly writes the application to create multiple threads. However, hardware development in the processor space is becoming increasingly radical, calling for execution of code and allocation of resources to be controlled in the processor space. Yet, the intentions of software developers may get lost in the execution of code. Therefore, it would be advantageous to provide a method, apparatus, and program for creating light weight threads and executing code asynchronously.